import request from '@/utils/request'

// 查询菜谱管理列表
export function listRecipes(query) {
  return request({
    url: '/teahouse/recipes/list',
    method: 'get',
    params: query
  })
}

// 查询菜谱管理详细
export function getRecipes(recipeId) {
  return request({
    url: '/teahouse/recipes/' + recipeId,
    method: 'get'
  })
}

// 新增菜谱管理
export function addRecipes(data) {
  return request({
    url: '/teahouse/recipes',
    method: 'post',
    data: data
  })
}

// 修改菜谱管理
export function updateRecipes(data) {
  return request({
    url: '/teahouse/recipes',
    method: 'put',
    data: data
  })
}

// 删除菜谱管理
export function delRecipes(recipeId) {
  return request({
    url: '/teahouse/recipes/' + recipeId,
    method: 'delete'
  })
}
